package com.ruoyi.point.service.impl;

import com.ruoyi.point.mapper.AlarmConfigurationMapper;
import com.ruoyi.point.pojo.AlarmConfiguration;
import com.ruoyi.point.service.IAlarmConfigurationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 报警配置Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-22
 */
@Service
public class AlarmConfigurationServiceImpl implements IAlarmConfigurationService
{
    @Autowired
    private AlarmConfigurationMapper alarmConfigurationMapper;

    /**
     * 查询报警配置
     *
     * @param alarmConfigId 报警配置主键
     * @return 报警配置
     */
    @Override
    public AlarmConfiguration selectAlarmConfigurationByAlarmConfigId(Long alarmConfigId)
    {
        return alarmConfigurationMapper.selectAlarmConfigurationByAlarmConfigId(alarmConfigId);
    }

    /**
     * 查询报警配置列表
     *
     * @param alarmConfiguration 报警配置
     * @return 报警配置
     */
    @Override
    public List<AlarmConfiguration> selectAlarmConfigurationList(AlarmConfiguration alarmConfiguration)
    {
        return alarmConfigurationMapper.selectAlarmConfigurationList(alarmConfiguration);
    }


    /**
     * 新增报警配置
     *
     * @param alarmConfiguration 报警配置
     * @return 结果
     */
    @Override
    public int insertAlarmConfiguration(AlarmConfiguration alarmConfiguration)
    {
        return alarmConfigurationMapper.insertAlarmConfiguration(alarmConfiguration);
    }

    /**
     * 修改报警配置
     *
     * @param alarmConfiguration 报警配置
     * @return 结果
     */
    @Override
    public int updateAlarmConfiguration(AlarmConfiguration alarmConfiguration)
    {
        return alarmConfigurationMapper.updateAlarmConfiguration(alarmConfiguration);
    }

    /**
     * 批量删除报警配置
     *
     * @param alarmConfigIds 需要删除的报警配置主键
     * @return 结果
     */
    @Override
    public int deleteAlarmConfigurationByAlarmConfigIds(Long[] alarmConfigIds)
    {
        return alarmConfigurationMapper.deleteAlarmConfigurationByAlarmConfigIds(alarmConfigIds);
    }

    /**
     * 删除报警配置信息
     *
     * @param alarmConfigId 报警配置主键
     * @return 结果
     */
    @Override
    public int deleteAlarmConfigurationByAlarmConfigId(Long alarmConfigId)
    {
        return alarmConfigurationMapper.deleteAlarmConfigurationByAlarmConfigId(alarmConfigId);
    }
}
